package com.heisen.base.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

import java.util.Map;


/**
 * 〈一句话功能简述〉<br> 
 * 〈Restful接口调用〉
 *
 * @author Chenwei
 * @create 2018/10/30
 * @since 1.0.0
 */

@Slf4j
@Component
public class HttpRestfulUtil {

    @Autowired
    private RestTemplate restTemplate;


    public void doPut(String url, Object body) {
        restTemplate.put(url, body);
    }

    public void doDelete(String url) {
        restTemplate.delete(url);
    }

    public void doDelete(String url, Map<String, Object> params) {
        restTemplate.delete(url, params);
    }



}
